package com.tkuniyoshi.battleship.server.common.log;

import com.tkuniyoshi.battleship.server.common.log.logmessage.BaseLogger;
import com.tkuniyoshi.battleship.server.common.log.logmessage.LogMessage;

/**
 * BattleShipGameServer Logger
 * 
 * @author takahito
 * 
 */
public class BSGSLogger extends BaseLogger {
	private static BSGSLogger logger = null;

	private BSGSLogger() {
		super(BSGSLogger.class);
	}

	public static void printLog(LogMessage log) {
		if (logger == null) {
			logger = new BSGSLogger();
		}
		logger.log(log);
	}

	public static void printLog(LogMessage log, Throwable exception) {
		if (logger == null) {
			logger = new BSGSLogger();
		}
		logger.log(log, exception);
	}

	public static void printLog(LogMessage log, Object[] obj) {
		if (logger == null) {
			logger = new BSGSLogger();
		}
		logger.log(log, obj);
	}

	public static void printLog(LogMessage log, Object[] obj,
			Throwable exception) {
		if (logger == null) {
			logger = new BSGSLogger();
		}
		logger.log(log, obj, exception);
	}
}
